package service.version5;


import dao.version5.UserInfoDao;
import dao.version5.UserInfoHistoryDao;

public class UserService implements UserServiceInf {
    private UserInfoDao userInfoDao;

    public void setUserInfoDao(UserInfoDao userInfoDao) {
        this.userInfoDao = userInfoDao;
    }

    public void setUserInfoHistoryDao(UserInfoHistoryDao userInfoHistoryDao) {
        this.userInfoHistoryDao = userInfoHistoryDao;
    }

    private UserInfoHistoryDao userInfoHistoryDao;

    @Override
    public void archive(String userid, String username) {

        userInfoDao.deleteById(userid);
        userInfoHistoryDao.insert(userid, username);

    }
}
